# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
# Contributor: Eduard Tolosa <edu4rdshl@protonmail.com>

pkgname=findomain
_pkgname=Findomain
pkgver=9.0.3
pkgrel=1
pkgdesc='The fastest and cross-platform subdomain enumerator, do not waste your time'
url='https://github.com/Findomain/Findomain'
arch=('loong64' 'x86_64')
license=('GPL3')
depends=(
  'gcc-libs'
  'libssl.so'
)
makedepends=('cargo')
optdepends=('postgresql: for subdomain monitoring')
source=("https://github.com/${_pkgname}/${_pkgname}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
b2sums=('1eaa8b79259a502a2601649e47fcffef147ac1f12bed33eab2ba1079d21b505557a3a06de9b6a42de697b84fb43b9852ced51ff85d491d5b60568eab36bd6f6e')
options=(!lto)

build() {
  cd ${_pkgname}-${pkgver}
  OPENSSL_NO_VENDOR=1 cargo build --release --locked
}

check() {
  cd ${_pkgname}-${pkgver}
  OPENSSL_NO_VENDOR=1 cargo test --release --locked
}

package() {
  cd ${_pkgname}-${pkgver}

  install -Dm 755 "target/release/${pkgname}" -t "${pkgdir}/usr/bin"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 "${pkgname}.1" -t "${pkgdir}/usr/share/man/man1"
}

# vim: ts=2 sw=2 et:
